package main.java.visitor;

/**
 * 访问者模式
 */
public class Demo {
    public static void main(String[] args) {
        Home home = new Home();

        home.add(new Dog());
        home.add(new Cat());
        Owner owner =new Owner();
        home.action(owner);
    }
}
